package cc.jorange.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import cc.jorange.bean.User;

/**
 * 
 * @author Aaron
 *
 */
public interface UserDao extends PagingAndSortingRepository<User, Long>, JpaSpecificationExecutor<User> {

	User findByLoginName(String loginName);

	@Query("from User u where u.loginName=?1")
	List<User> getUser(String loginName);

}
